package com.example.hospital.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.time.LocalDate;

/**
 * 
 * @TableName blacklist
 */
@TableName(value ="blacklist")
public class Blacklist implements Serializable {
    /**
     * 
     */
    @TableId(value = "blacklist_id", type = IdType.AUTO)
    private Integer blacklistId;

    /**
     * 
     */
    @TableField(value = "patient_id")
    private Integer patientId;

    /**
     * 
     */
    @TableField(value = "reason")
    private String reason;

    /**
     * 
     */
    @TableField(value = "blacklist_date")
    private LocalDate blacklistDate;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    /**
     * 
     */
    public Integer getBlacklistId() {
        return blacklistId;
    }

    /**
     * 
     */
    public void setBlacklistId(Integer blacklistId) {
        this.blacklistId = blacklistId;
    }

    /**
     * 
     */
    public Integer getPatientId() {
        return patientId;
    }

    /**
     * 
     */
    public void setPatientId(Integer patientId) {
        this.patientId = patientId;
    }

    /**
     * 
     */
    public String getReason() {
        return reason;
    }

    /**
     * 
     */
    public void setReason(String reason) {
        this.reason = reason;
    }

    /**
     * 
     */
    public LocalDate getBlacklistDate() {
        return blacklistDate;
    }

    /**
     * 
     */
    public void setBlacklistDate(LocalDate blacklistDate) {
        this.blacklistDate = blacklistDate;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Blacklist other = (Blacklist) that;
        return (this.getBlacklistId() == null ? other.getBlacklistId() == null : this.getBlacklistId().equals(other.getBlacklistId()))
            && (this.getPatientId() == null ? other.getPatientId() == null : this.getPatientId().equals(other.getPatientId()))
            && (this.getReason() == null ? other.getReason() == null : this.getReason().equals(other.getReason()))
            && (this.getBlacklistDate() == null ? other.getBlacklistDate() == null : this.getBlacklistDate().equals(other.getBlacklistDate()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getBlacklistId() == null) ? 0 : getBlacklistId().hashCode());
        result = prime * result + ((getPatientId() == null) ? 0 : getPatientId().hashCode());
        result = prime * result + ((getReason() == null) ? 0 : getReason().hashCode());
        result = prime * result + ((getBlacklistDate() == null) ? 0 : getBlacklistDate().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", blacklistId=").append(blacklistId);
        sb.append(", patientId=").append(patientId);
        sb.append(", reason=").append(reason);
        sb.append(", blacklistDate=").append(blacklistDate);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}